package com.example.demoserver.controller;

import com.example.demoserver.entity.InteIdentify;
import com.example.demoserver.service.InteIdentifyService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@RestController
@RequestMapping("/identify")
@RequiredArgsConstructor
@Component
public class InteIdentifyController {
    private final InteIdentifyService inteIdentifyService;
    @PostMapping("/save")
    public boolean saveData(@RequestBody List<InteIdentify> inteIdentifies){
        boolean bol=inteIdentifyService.saveBatch(inteIdentifies);
        return bol;
    }

    @GetMapping("/selectall")
    public List<InteIdentify> selectAll(){
        List<InteIdentify> list=inteIdentifyService.selectAll();
        return list;
    }
}
